package com.qfmy.webapp.service.agent;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.service.ai
 * @date 2025/11/12
 * @description 智能体
 */
@AiService(
        chatModel = "qwenChatModel",
        wiringMode = EXPLICIT,
        chatMemoryProvider="chatMemoryProvider",
        tools = "novelTools"
)
public interface Assistant {

    /**
     * 智能小说客服
     * @param userMessage
     * @return
     */
    @SystemMessage(fromResource = "novel-prompt-template.txt")
    String chat (@MemoryId int memoryId, @UserMessage String userMessage);

}
